<?php

class cache_engine_eaccelerator implements iCacheControllerBackend {
	
	public function __construct () {}
	
	public function load($key, $lifetime) {
		$result = eaccelerator_get($key);
		if ($result) {
			return unserialize ($result);
		} else {
			return false;
		}
	}
	
	public function save($key, $value, $lifetime) {
		eaccelerator_put ($key, serialize ($value), $lifetime);
	}
	
	public function delete ($key) {
		eaccelerator_rm ($key);
	}
	
}